import { createRouter, createWebHashHistory } from 'vue-router'


const routes = [
 {path:'/',redirect:'/home'},
 {path:'/home',name:"home",components:{
  default:()=>import("@/views/Home/Home.vue"),
  mytab:()=>import("@/components/MyTab.vue"),
}},
 {path:'/detail/:proid',name:"detail",component:()=>import("@/views/Home/MyDetail.vue")},
 {path:'/cate',name:"cate",components:{
  default:()=>import("@/views/Cate/Cate.vue"),
  mytab:()=>import("@/components/MyTab.vue"),
}},
 {path:'/cart',name:"cart",components:{
  default:()=>import("@/views/Cart/Cart.vue"),
  mytab:()=>import("@/components/MyTab.vue"),
}},
 {path:'/login',name:"login",components:{
  default:()=>import("@/views/Login/Login.vue"),
  mytab:()=>import("@/components/MyTab.vue"),
}},
 
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router;
